/*
  Jeffrey Minton
  camera.h
  Camera class: includes all functions necesary to connet a camera, and get images.
  This class will be responsible for all image processing in the future and will be
  responsible for making decissions based on image analysis
*/

#ifndef CAMERA_H
#define CAMERA_H

#include "cxcore.h"
#include "cv.h"
#include "highgui.h"
#include "QMessageBox"
#include <QList>
#include <QFileDialog>
#include "iostream"

class Camera
{
public:
    Camera();//consructor

    //gets an frame from the camera and saves the image
    IplImage* getImageSave(int imgNum);

    //displays an image in a gui window
    void showImage();

    //connect a camera
    int connectCam(int index);

    //get a frame from the camera and store it in imgColor
    IplImage* getImage();

    bool findStripe();

    QList<CvPoint*> getLines(int resolution, IplImage *imgIn);

    IplImage* openImage(QString fileName);

    bool insideCircle();

private:
    CvCapture* capture;//the camera
    QMessageBox alert;
    IplImage* imgColor;//image
    //IplImage* img;

};

#endif // CAMERA_H
